package com.itheima.Service;

import com.itheima.pojo.Category;
import com.itheima.pojo.PageBean;
import com.itheima.pojo.Product;

import java.time.LocalDate;
import java.util.List;

public interface ProductService {
    /*
     *   查询所有商品分类
     * */
    PageBean categoriesList(Integer page, Integer pageSize, String name);

    /*
     *   分页查询所有商品
     * */
    PageBean page(Integer page, Integer pageSize, String name, Integer category_id, LocalDate begin, LocalDate end);

    void deleteCategoryById(List<Integer> ids);


    void deleteProductById(List<Integer> id);

    void addProduct(Product product);

    Product getProduct(int id);

    void updateProduct(Product product);

    void updateCategory(Category category);

    void insertCategory(Category category);

    Category selectCategoryById(int id);

    Product validate(String name);

}
